package com.qys.livesMall.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;

/**
 * <p>
 *
 * </p>
 *
 * @author caoz
 * @since 2023-04-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("h2_sys_config")
@Schema(name = "H2SysConfig对象", description = "H2SysConfig对象")
public class H2SysConfig implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "标题")
    @TableField("title")
    private String title;

    @Schema(description = "分组字段")
    @TableField("group_id")
    private String groupId;

    @Schema(description = "分组名称")
    @TableField("group_name")
    private String groupName;

    @Schema(description = "字段类型")
    @TableField("`type`")
    private String type;

    @Schema(description = "如果为字典项，若依字典值是否多选")
    @TableField("multiple")
    private String multiple;

    @Schema(description = "是否为图片 0-否 1-是")
    @TableField("picture")
    private Integer picture;

    @Schema(description = "是否为视频 0-否 1-是")
    @TableField("video")
    private Integer video;

    @Schema(description = "是否为富文本 0-否 1-是")
    @TableField("rech")
    private Integer rech;

    @Schema(description = "字段取值key 该字段唯一，前端取值的时候使用")
    @TableField("`key`")
    private String key;

    @Schema(description = "字段值（普通纸保存到value）")
    @TableField("`value`")
    private String value;

    @Schema(description = "富文本保存到value")
    @TableField("richText")
    private String richText;

    @Schema(description = "字段备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "排序")
    @TableField("`sort`")
    private Integer sort;

    @Schema(description = "排序")
    @TableField("`required`")
    private String required;

    @Schema(description = "字典类型")
    @TableField("`dict_type`")
    private String dictType;

    @Schema(description = "单位")
    @TableField("`unit`")
    private String unit;

    @Schema(description = "创建者")
    @TableField("create_by")
    private String createBy;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "更新者")
    @TableField("update_by")
    private String updateBy;

    @Schema(description = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;
}
